package com.huluobo.jetpackdemo.hilt

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import androidx.lifecycle.ViewModelProvider
import com.huluobo.jetpackdemo.R
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class HIltActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_hilt)

        val vm = ViewModelProvider(this)[LoginViewModel::class.java]
        vm.login("LC", "123").let {
            //let 当产生返回值的时候
            Log.i("TagA", "user:$it")
        }
    }
}